<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:c="http://java.sun.com/jstl/core"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>  
        <title>合同列表</title>
        <script type="text/javascript">
            function setContract(pcode,pname){                
                window.opener.setContract(pcode,pname);
                window.close();
            }
        </script>
    </h:head>
    <h:form>
        <rich:dataTable id="incontractTable" value="#{conExec.contractlist}" var="incontract"
                        rowClasses="list-row-odd,list-row-even"
                        headerClass="table-header" >
            <h:column>
                <f:facet name="header">
                    <h:panelGroup>
                        <h:outputText value="主合同编号"/>
                    </h:panelGroup>
                </f:facet>
                <h:outputText value="#{incontract.number}"/>
            </h:column>
            <h:column >
                <f:facet name="header">
                    <h:panelGroup>
                        <h:outputText value="名称"/>
                    </h:panelGroup>
                </f:facet>
                <h:outputText value="#{incontract.cname}">
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:panelGroup>
                        <h:outputText value="合同类别"/>
                    </h:panelGroup>
                </f:facet>
                <h:outputText value="#{incontract.contracttype.name}">
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:panelGroup>
                        <h:outputText value="合同内容"/>
                    </h:panelGroup>
                </f:facet>
                <h:outputText value="#{incontract.gType.name}">
                </h:outputText>
            </h:column>
            <rich:column>
                <h:commandLink id="linkCon" onclick="setContract('#{incontract.number}','#{incontract.cname}');">
                    <h:outputText value="选择" />
                </h:commandLink>
            </rich:column>
        </rich:dataTable>
    </h:form>
</ui:composition>
